<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        {{message}}
        <button @click="reverseMessage">反转消息</button>
        <ul>
            <li v-for="x in list">
                {{x.wq}}------{{x.jg}}
            </li>
        </ul>
        <div>
            {{"a="+a}}
            <input v-model="a">
        </div>
        <div v-if="show">
            你猜我在哪
        </div>
    </div>


    <script>
        var app = new Vue({
            el: "#app",
            data: {
                message: "gnls",
                a: "",
                show:true,
                list: [
                    {
                        wq: "AK47|火神(崭新出厂)",
                        jg: "1999"
                    },
                    {
                        wq: "AK47|火蛇(崭新出厂)",
                        jg: "8888"
                    },
                    {
                        wq: "AK47|血腥运动(崭新出厂)",
                        jg: "288"
                    }
                ]
            },
            methods: {
                reverseMessage: function () {
                    this.message = this.message.split('').reverse().join('');
                }
            },
            beforeCreate(){
                console.log("这是beforeCreate")
            },
            created:function(){
                this.a = "created!!!";
                console.log("简单男孩")
            },
            beforeMount(){
                console.log("我是beforeMount")
            },
            mounted(){
                console.log("我是Mounted")
            },
            beforeUpdate(){
                console.log("我是beforeupdate")
            },
            updated(){
                console.log("我是updated")
            },
            destroyed(){
                console.log("")
            }
        });
    </script>
</body>

</html>